home *** CD-ROM | disk | FTP | other *** search
- Path: raven.inka.de!not-for-mail
- From: jw@raven.inka.de (Josef Wolf)
- Newsgroups: comp.sys.m68k
- Subject: Re: MC68332/TPU programming
- Date: 6 Apr 1996 13:09:48 +0200
- Organization: PPC Germersheim (Germany), raven on the wire
- Message-ID: <4k5jds$j7c@raven.inka.de>
- References: <31581C41.104A@telogy.com>
- NNTP-Posting-Host: raven.inka.de
- X-Newsreader: NN version 6.5.0 #4 (NOV)
-
- In <31581C41.104A@telogy.com> Christine Price <cprice@telogy.com> writes:
- >I'm learning how to design with the MC68332. I have an existing design
- >that I must retro-fit with this new processor. The old design incor-
- >porates a 12.288MHz clock. It also derives a divide by 4 signal from
- >this clock. The problem I have is that it would be nice to run the new
- >processor at 20MHz but I can't seem to find a way to generate both the
- >12.288MHz and the 3.072MHz signal from the system clock using the TPU.
- >Does anyone know of a way to do this?
-
- The TPU needs 12 clocks for a time slot transition plus additional
- commands (depends on the tpu-code. So you just won't be able to generate
- anything above 833kHz with 20MHz system-clock.
-
- If you want to generate fast clocks with the tpu you have to _abuse_ it.
-
- hack away u-code which does the following:
- clr cflg0.
- T:
- pin := high;
- if cflg0 == 0 then goto T.
- pin := low.
-
- This will give you SYSCLK/4, so you can get 3.072MHz if you run the CPU
- with 12.288MHz.
-
- You can even get SYSCLK/6 if you can accept a duty-cycle of 67% :
-
- clr cflg0.
- T:
- pin := high. (* <- note the dot instead of a semicolon! *)
- if cflg0 == 0 then goto T.
- pin := low.
-
- Now you can get your 3.072MHz with a SYSCLK of 18.432MHz. You _can't_ get
- the 12.288MHz this way.
-
- Note that there are _no_ more time slot transitions and the tpu therefore
- won't be able to perform _any_ other task. A price I would not like to pay.
-
- I suggest to copy the 12.288 and 3.072 MHz from the old design.
-
- Greetings
- --
- -- Josef Wolf -- jw@raven.inka.de -- Germersheim, Germany --
-